﻿<local:DocumentBase x:Class="WPFExcelReport.CADMAPINTEX"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                    xmlns:lb="clr-namespace:CADInterface" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"
                    Loaded="Window_Loaded" 
                    >
    <local:DocumentBase.Resources>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:String2ColorConverter  x:Key="str2color"/>
        <lb:DSTCADDB  x:Key="dSTCADDB" />
        <CollectionViewSource  x:Key="vwWASTAMM" Source="{Binding Path=WASTAMM_CAD,Source={StaticResource dSTCADDB}}"/>
    </local:DocumentBase.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition   Height="40" />
            <RowDefinition   Height="40" />
            <RowDefinition  Height="Auto" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition  Width="300" />
            <ColumnDefinition Width="50" />
            <ColumnDefinition   Width="300" />
            <ColumnDefinition Width="50" />
            <ColumnDefinition   Width="300" />
        </Grid.ColumnDefinitions> 
        <StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="5" >
            <WrapPanel>
                <StackPanel>
                <Button  Height="40"  Width="40" Margin="0,0,0,0" Name="btnGetCADMap" Click="btnGetCADMap_Click"
                         KeyboardNavigation.TabIndex="3" IsDefault="True">
                    <Button.Background>
                        <ImageBrush ImageSource="/IntexReportClient;component/Images/Reload.png" />
                    </Button.Background>
                </Button>
                    <TextBlock>重新生成接口定义</TextBlock>
                </StackPanel>
                <StackPanel>
                <Button  Name="cmdSaveMap" Click="cmdLoadCADMap_Click" Width="40" Height="40">
                    <Button.Background>
                        <ImageBrush  ImageSource="/IntexReportClient;component/Images/Upload.png" />
                    </Button.Background>
                </Button>
                    <TextBlock>加载接口定义</TextBlock>
                </StackPanel>
            </WrapPanel>
        </StackPanel>
        <StackPanel Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="5" >
            <TextBlock  HorizontalAlignment="Center">MAP</TextBlock> 
            <DataGrid  AutoGenerateColumns="True" EnableRowVirtualization="True" ItemsSource="{Binding Source={StaticResource ResourceKey=vwWASTAMM}}"
                               HeadersVisibility="Column" x:Name="dlgCADMAPINTEX"  RowDetailsVisibilityMode="VisibleWhenSelected" Width="Auto" Height="Auto" EnableColumnVirtualization="True" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto" MinHeight="80" MaxHeight="200">
            </DataGrid>
        </StackPanel>
    </Grid>
</local:DocumentBase>
